<template>
  <div style="width: 1000px">
  <el-radio-group v-model="labelPosition" size="small">
    <el-radio-button label="left">左对齐</el-radio-button>
    <el-radio-button label="right">右对齐</el-radio-button>
    <el-radio-button label="top">顶部对齐</el-radio-button>
  </el-radio-group>
  <div style="margin: 20px;"></div>
  <el-form :label-position="labelPosition" label-width="80px" :model="columns">
    <el-form-item label="栏目编号">
      <el-input v-model="columns.columnId"></el-input>
    </el-form-item>
    <el-form-item label="栏目类型">
      <el-input v-model="columns.columnType"></el-input>
    </el-form-item>
    <el-button  @click="turnPage(columnId,'list')">返回</el-button>
  </el-form>
  </div>
</template>
<script>
  import {SystemManageService} from '../SystemManageService'
  export default {
    name: "DisplayColumn",
    data() {
      return {
        labelPosition: 'right',
        columns: {}
      }
    },
    props:{
      columnId:''
    },
    mounted: function () {
      this.findColumnById(this.columnId);
    },
    methods: {
      findColumnById(columnId) {
        SystemManageService.findColumnById(columnId).then(res => {
          this.columns = res.data;
        })
      },
      turnPage(columnId,type){
        // let articleId = this.articleId;
        this.$emit('turnPage',columnId,type)
      },
    }
  }
</script>

<style scoped>

</style>
